package com.koron.order.cockpit.mapper;

import com.koron.bean.system.org.OrgBean;
import com.koron.order.cockpit.bean.EquipmentStatus;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface YcCockpitMapper {
    @MapKey("status")
    Map<String, Object> getDefectTypeAndCountByDate(@Param("deptList") List<String>deptList,@Param("date") String date);

    String queryRootOrg();

    List<OrgBean> queryAllOrg();

    Long getPatrolCount(@Param("deptList") List<String>deptList,@Param("date") String date);

    Long getPatrolErrorCount(@Param("deptList") List<String>deptList,@Param("date") String date);

    Long getPatrolInTimeFinishCount(@Param("deptList") List<String>deptList,@Param("date") String date);

    Long getPatrolAllFinishCount(@Param("deptList") List<String>deptList,@Param("date") String date);

    int sumOrderTotal();

    int sumTicketTotal();

    List<EquipmentStatus> getEquipmentStatus();

    Integer getDefectRate(@Param("deptList") List<String>deptList, @Param("date")String date);

    Integer getDefectInTimeRate(@Param("deptList") List<String>deptList, @Param("date")String date);

    Integer getOrderCheckPassRate(@Param("deptList") List<String>deptList, @Param("date")String date);

    Integer getTicketCheckPassRate(@Param("date")String date,@Param("deptList") List<String>deptList);
}
